projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
312b646
)
Do not pass DIRECTMAP_VIRT_END to virt_to_mfn(). It's out of range.
author
Keir Fraser
<keir.fraser@citrix.com>
Fri, 20 Mar 2009 09:34:09 +0000
(09:34 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Fri, 20 Mar 2009 09:34:09 +0000
(09:34 +0000)
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/common/page_alloc.c
patch
|
blob
|
history
diff --git
a/xen/common/page_alloc.c
b/xen/common/page_alloc.c
index eb07404e7afc4704eb8fd52ace311077de6e1d6b..830e44cdb47e3a4c707ee3c10a999463e29368f1 100644
(file)
--- a/
xen/common/page_alloc.c
+++ b/
xen/common/page_alloc.c
@@
-299,7
+299,7
@@
static unsigned long init_node_heap(int node, unsigned long mfn,
}
#ifdef DIRECTMAP_VIRT_END
else if ( nr >= needed &&
-
mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END
) )
+
(mfn + needed) <= (virt_to_mfn(DIRECTMAP_VIRT_END - 1) + 1
) )
{
_heap[node] = mfn_to_virt(mfn);
avail[node] = mfn_to_virt(mfn + needed) - sizeof(**avail) * NR_ZONES;